load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/canister_client",
    "//rs/config",
    "//rs/crypto/sha2",
    "//rs/registry/transport",
    "//rs/replica_tests",
    "//rs/rust_canisters/dfn_candid",
    "//rs/rust_canisters/on_wire",
    "//rs/state_machine_tests",
    "//rs/types/management_canister_types",
    "//rs/types/types",
    "@crate_index//:backoff",
    "@crate_index//:candid",
    "@crate_index//:cargo_metadata",
    "@crate_index//:escargot",
    "@crate_index//:ic-management-canister-types",
    "@crate_index//:rand",
    "@crate_index//:tokio",
    "@crate_index//:wasmprinter",
    "@crate_index//:wat",
]

MACRO_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "canister_test",
    testonly = True,
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "canister_test",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_doc_test(
    name = "canister_test_doc_test",
    crate = ":canister_test",
)
